aslain.dev
0%
01 Hizmetler 02 Hakkımda 03 Projeler 04 Stack 05 Blog 06 İletişim
← Tüm makaleler Metin2

Metin2 Mount System: Setup and Riding Bonuses

If you want to go beyond plain horses and offer your players combat mounts, you need real control over the metin2 mount system. The classic riding mechanic ships ready in most clients; the actual work is defining mounts as items, assigning a model and bonuses to each one, separating combat mounts from decorative ones, and balancing all of it without wrecking your server's economy. In this guide I walk through the full pipeline, from item_proto to server code and quest functions, step by step.

How the mount system works

In Metin2 a mount is, visually, a mob model the character sits on. That means every mount is actually a record in mob_proto with its own vnum; the character "rides" that vnum and the server adds a RIDING flag to its state. What triggers all this is the mount item in the inventory. The flow goes like this:

  • The player uses a mount item (double-clicks it).
  • The server reads the mob vnum bound to that item and seats the character on that model.
  • While the mount is active, bonus affects are applied to the character (HP, movement speed, attack value, etc.).
  • When the duration runs out or the player dismounts, the mount and its bonuses are removed.

This separation matters: the visual (mob model), the trigger (inventory item) and the effect (bonus affects) are three distinct layers. Wire them up wrong and you'll end up with either an invisible mount or an item whose bonus never fires.

item_proto: defining the mount item

For each mount you create a record in the item_proto table. Mount items are usable (USE) items that seat the character when used. The critical field is the one pointing to which mount model the item maps to — that is, one of the value fields holds the mount's mob_proto vnum. A typical example:

vnum     | name              | type      | subtype     | value0 | value1
---------+-------------------+-----------+-------------+--------+-------
71114    | War Horse (Red)   | ITEM_USE  | USE_MOUNT   | 20114  | 0

Here value0 is the mount's mob vnum (example: 20114) and value1 can be used for duration control (in seconds; 0 = unlimited). Field names and order vary by source version, so use your own item_proto template as the reference and don't invent values. After the change, remember to mirror item_proto on the client side too (usually the item_proto and item_names files); otherwise the item won't appear, or will show up "empty", in the client.

The mount's model and bonuses

The mount itself is defined in mob_proto. The most important parts here are the model file (the mount's .gr2 / motion pack) and getting the mount's type set correctly. Mount bonuses are affects that kick in when the player mounts, and they are usually granted in one of two ways:

  • Fixed bonuses: baked into the mount, identical every time you ride (e.g. +20% movement speed).
  • Quest-based bonuses: added via quest logic when the player mounts — timed or conditional.

The second method is far more flexible, because you can change the bonus without recompiling code, just by updating a quest file. If you'd rather not compile the server source, keeping all your balance tuning on the quest side is the smart move.

Combat mounts and quest functions

Metin2 has two kinds of mount: the regular mount, which is purely decorative or gives speed, and the combat mount, which lets you attack while riding. A combat mount lets you use your weapon while seated and trigger special mounted skills (such as a charge attack). This behaviour is decided in server code based on the mount type.

To manage mounts from a quest you use Metin2's built-in pc functions. The most common ones:

-- Mount the player on mount 20114 for 60 seconds
pc.mount(20114, 60)

-- Is the player currently mounted?
if pc.is_mount() then
    say("You are already mounted.")
end

-- Dismount
pc.unmount()

-- Apply a timed bonus when mounting
-- (apply type, value, duration[sec])
pc.mount_bonus(apply.MOV_SPEED, 20, 60)

If you want to tie a mount item to a quest, you catch the item use and call pc.mount there:

quest mount_war_horse begin
    state start begin
        when 71114.use begin
            if pc.is_mount() then
                pc.unmount()
            else
                pc.mount(20114, 0)               -- ride indefinitely
                pc.mount_bonus(apply.MAX_HP, 3000, 0)
                pc.mount_bonus(apply.ATT_GRADE_BONUS, 50, 0)
            end
        end
    end
end

Here the same item handles both mounting and dismounting: if the player is already mounted they dismount, otherwise they mount. Granting bonuses with pc.mount_bonus lets you gather all the balance tuning in a single quest file. Important: make sure the apply constants you use match the definitions in your server source exactly; a wrong apply type silently does nothing, or grants an unexpected bonus.

Balancing: keeping bonuses under control

Mount bonuses are one of the fastest ways to break PvP and economy balance on a server. A powerful mount everyone can reach becomes a permanent stat buff and forces players to "have to ride". A few practical rules:

  • Keep bonuses modest. Movement speed is a natural mount bonus; but inflating attack/defence stats wrecks your whole balance table. Start small and raise it with player feedback.
  • Put combat mounts on a separate tier. A combat mount is a strong advantage; don't make it a cheap item everyone can use forever. Keeping it timed (event or cash shop) preserves balance.
  • Restrict them on PvP maps. Disabling mount bonuses, or mounting entirely, in guild wars or arenas stops skill from losing to an item.
  • Think duration and cost together. A free permanent mount has zero value; timed, reasonably priced mounts keep both the economy and in-game goals alive.

After every change, check the syserr logs: a wrong vnum or a missing model can cause a silent crash or an invisible-mount bug when the player mounts.

Testing and going live

Before pushing a mount live, run this checklist with a GM account: does the mount appear when the item is used, are the bonuses applied (open the character info and verify the stats), does it dismount cleanly when time runs out or via pc.unmount(), and does the mount not get stuck in edge cases like teleport, death or guild war. Make sure the client and server item_proto are in sync; the most common bug is a mount that exists on the server but wasn't mirrored to the client, so it never shows for players.

Frequently Asked Questions

What's the difference between a mount and a pet?

A pet is a separate entity that walks beside the character, grants bonuses on its own and usually needs feeding. A mount is a model the character sits on and grants a bonus only while you're riding. Under the hood both rest on a mob model, but they're managed with different flags and mechanics.

Can I change bonuses without compiling code?

Yes. If you grant bonuses via pc.mount_bonus from a quest file, you don't need to recompile the server source; just update the quest and trigger a quest reload of the quest folder. This makes balance testing much faster.

My mount is invisible when I ride, why?

Almost always a client-server mismatch: the mount's mob_proto record exists on the server, but the client's mob_proto or the model pack (.gr2/motion) is missing. First verify the vnums match, then that the model file is present in the client pack; syserr and the client log usually point at the missing file.

Setting up a balanced mount system on your server? From combat mounts to bonus balance, we can work together on Metin2 server source, quest and item editing. Get in touch with me to discuss your project.

Devamı için