Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

How To: Create Custom Achievements

Junior Spellweaver
Joined
Nov 16, 2013
Messages
102
Reaction score
21
I was playing around with Client and Server files, saw Achievement files and starting editing it for no reason, or maybe the main reason was boredom. What I came up with were custom Achievements.
Those require both: Server and Client side configuration, if you only change something on Client side, they obviously won't work. Editing them can provide your players more customized gameplay, because you can add Gold and Items to Achievements as rewards (Yes, that's in official code, they just don't use that, too bad). Achievement setup might be confusing from the beginning but once you make 1-3, you'll know what to do easily.

Here's how-to:
- Basic stuff you need to know:
- There are 15+2 Achievement types (ID, name, required parameters)
-ID: 1 - Level (Example ,,1,0,10,0 - ,,ID(1),0,LEVEL,0)
-ID: 2 - Collect x amount of Gold (Example ,,2,2000000000,0,0 - ,,ID,AMOUNT,0,0)
-ID: 3 - Reach x Reputation (Affinity, Charity, Romance, Culture, Honor, Expertise) (Example ,,3,11,500000,0 - ,,ID,REPUTATION ID,AMOUNT,0)
-ID: 4 - Kill x monster (Example ,,4,5594,0,0 - ,,ID,MOB ID,0,0)
-ID: 1001 - Kill x amount of x monsters (Example ,,1001,13445,19,0 - ID,MOB ID, AMOUNT,0)
-ID: 7 - Refine or fail to x refinery level (Example ,,7,7,8,0 - ,,ID,CURRENT LEVEL,SUCCESS/FAIL LEVEL(1 up if success, 0 if fail),0)
-ID: 11 - Equip x Item (Example ,,11,20144,0,0 - ,,ID,ITEM ID,0,0)
-ID: 1002 - Craft x Item (Example ,,1002,2912,14065,99 - ,,ID,RECIPE ID,ITEM ID,AMOUNT)
-ID: 5 - Reach x amount of Infamy points (Example ,,5,100,0,0 - ,,ID.AMOUNT,0,0)
-ID: 1003 - Participate in X Battleground x times (Not tested, setup would probably be: ,,ID,BG ID,AMOUNT,0)
-ID: 8 +2-1 - Something related to Bloodbond, no idea what. It's not defined in Achievements.
-ID: 9 +2-2 - Something related to Pet, no idea what. It's not defined in Achievements.
-ID: 12 - Complete x Achievement/s (Example ,,12,80,0,0 - ,,ID,ACHIEVEMENT ID,0,0)
-ID: 6 - Complete x Task (Not tested, setup would probably be: ,,ID,TASK ID,0,0)
-ID: 1000 - Complete x Task x times (Example ,,1000,12856,99,0 - ,,ID,TASK ID,AMOUNT,0)
-ID: 1004 - Number of deaths (Example ,,1004,200,0,0 - ,,ID,AMOUNT,0,0)
-ID: 1005 - Refine +x x times (Example ,,1005,0,8,49 - ,,ID,0,REFINERY,AMOUNT)
- There are 3 reward types:
- Item (1 Item/Achievement only)
- x amount 0f Gold - Not sure which 0 has to be changed to receive Gold. - Example 30,,2,,0,,0,,0 -> ,,Points,,Broadcast,,ItemID,,0,,0
- x amount of Achievement Points
-There are 3 Broadcast types:
- 0 No broadcast
-1 Normal Chat Broadcast
-2 Server-wide Broadcast
- Here's a list of Faction IDs used in Achievements
- 1 - Jadeon
- 2 - Skysong
- 3 - Lupin
- 4 - Vim
- 0 - Modo
- 19 - Incense Mage
- 13 - Balo
- 14 - Arden
- 17 - Rayan
- 18 - Celan
- 16 - Forta
- 15 - Voida
- 30 - Psychea
- 31 - Kytos
- Here's a list of Reputation IDs used in Achievement
- 5 - Piety
- 6 - Romance
- 7 - Culture
- 8 - Expertise
- 9 - Dagos
- 10 - Felkin
- 11 - Fuwa
You can add your own custom Achievement tab - Appears in Achievements window
- Look for this part of code
Code:
              AchievementCfg.class =
{
    [1] = 
    {
        name= "Growth",
        
         [1] =
         {
             name ="Level",
         },
         [2] =
         {
             name ="Wealth",
         },
         [3] =
         {
             name ="Reputation",
         },
         [4] =
         {
             name ="Honor",
         },
      },

    [2] = 
    {
        name= "War",
         [1] = 
         {
             name ="PVE",
         },
         [2] =
         {
             name ="PVP",
         },
         [3] = 
         {
             name ="Battleground",
         },
         [4] =
         {
             name ="World Boss",
         },
         [5] =
         {
             name ="Chaos Battle",
         },
         [6] =
         {
             name ="Celestial City",
         },
         [7] =
         {
             name ="Crystal Rift",
         },
         [8] =
         {
            name ="World Boss II",
         },
      },

    [3] = 
    {
        name= "Adventure",
         [1] =
         {
             name ="General",
         },
         [2] =
         {
             name ="Human Honor",
         },
         [3] =
         {
             name ="Athan Honor",
         },
         [4] =
         {
             name ="Etherkin Honor",
         },
      },

    [4] = 
    {
        name= "Item",
         [1] =
         {
             name ="Wear",
         },
         [2] =
         {
             name ="Accessory",
         },
         [3] =
         {
             name ="Trinket",
         },
         [4] =
         {
             name ="Chi",
         },
         [5] =
         {
             name ="Essence",
         },
         [6] =
         {
             name ="Transform Gem",
         },
         [7] =
         {
             name ="Other",
         },
      },

    [5] = 
    {
        name= "Craft",
         [1] =
         {
             name ="Refinery",
         },
         [2] =
         {
             name ="Bloodbond",
         },
         [3] =
         {
             name ="Craft",
         },
         [4] =
         {
             name ="Pet Craft",
         },
      },

    [6] = 
    {
        name= "Special",
    },
}
and add anything you like to any of those pre-set Tabs or make your own. Example - Adding new Tab in "Special"
Code:
    [6] = 
    {
        name= "Special",
        
    },
}
Result will appear as "Spacial 1" sub-type in "Special" tab.

achieve.txt - Server Side File example with explanation
- 327,,0,0,0,0,0,0,,3,30,100000000,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,50,,1,,0,,0,,0 <- Achievement ID 327 - Justice Berry (Grade 10) - Psychea: Reach total of 100,000,000 Psychea Honor

Daraia - How To: Create Custom Achievements - RaGEZONE Forums

One 0 of last 2 0's should be gold, not sure which one

achievementcfg.lua - Cliet Side File - interfaces\script\ example
Code:
        [327]=
    {
        name        = "^00ff00Justice Berry (Grade 10)^00ff00", <- Achievement Name
        desc        = "Qualify for the Flameagle Order Grade 10 quest by reaching a total of 100,000,000 Psychea Honor.", <- Description
        preCondDesc = "空", <- Pre Condition
        mainClass   = 3, <- Achievement Type
        subClass    = 2, <- Achievement Sub Type
        awardScore  = 50, <- Amount of Achievement Points
        awardItem   = 0, <- Award Item
        awardMoney  = 0, <- Award Gold
        msg = "^ffcb4a%s^ffffff earned the ^00ff00%c<6><%s><>^ffffff achievement! Congratulations!", <- Broadcast message - Change it as you wish
        conds=
        {
            {
              id=3, <- Achievement Parameter ID
              params={30,100000000,}, <- Condition Parameters
--            descFormat="30,100000000,", <- Same as above
--            infoFormat = "%s reaches %d (%d/1)", <- Same on all achievements, 
            },
        }, 
    },
If there are 2 or more parameters, just add another
Code:
{
    id=,
    params={,,},
    descFormat=",,",
    infoFormat = "%s reaches %d (%d/1)"
}
under existing one, for example let's make this one also require 100,000,000 Kytos Honor.
Code:
[327]=
    {
        name        = "^00ff00Etherkin Honor^00ff00",
        desc        = "Qualify for the Flameagle Order Grade 10 quest by reaching a total of 100,000,000 Psychea and Kytos Honor.",
        preCondDesc = "空",
        mainClass   = 3,
        subClass    = 2,
        awardScore  = 50,
        awardItem   = 0,
        awardMoney  = 0,
        msg = "^ffcb4a%s^ffffff earned the ^00ff00%c<6><%s><>^ffffff achievement! Congratulations!",
        conds=
        {
            {
              id=3,
              params={30,100000000,},
--            descFormat="30,100000000,",
--            infoFormat = "%s reaches %d (%d/1)", 
            },
            {
              id=3,
              params={31,100000000,},
--            descFormat="31,100000000,",
--            infoFormat = "%s reaches %d (%d/1)", 
            },
        }, 
    },
And if we actually want to make this one work, we have to add another set of conditions to Achievement 327 in achieve.txt
Code:
327,,0,0,0,0,0,0,,3,30,100000000,0,,3,31,100000000,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,50,,1,,0,,0,,0
Now Achievement ID 327 requires 100.000.000 Psychea and Kytos honor, in order to finish it.

Anyway, I think this guide is quite complicated, so I made an actual example of achievement, step by step. This achievement requires you to kill a mob in order to complete it.

~ Adding new Sub-Tab
  1. Open "achievement.cfg" in any Text Editor (Notepad ++ is quite useful), you will find it in "interfaces\script"
  2. Look for this part of the code, we want to add a sub-type called "Special"
    Code:
    [6] = 
    {
            name= "Special",
            
        },
  3. Copy and paste following code over existing one in achievement.cfg file
    Code:
    [6] = 
      {
            name= "Special",
            [1] =
             {
                 name ="Special",
             },
        },
    }

    Save file, repack interfaces and login. New tab under "Special" called ... "Special" should show up
    Daraia - How To: Create Custom Achievements - RaGEZONE Forums
  4. Now that we have new Sub-Tab, it's time to make an Achievement.


~ Creating new Achievement
  1. Scroll to the bottom of "achievement.cfg" file, last achievement should be 337, if you're using v1324
    Code:
        [337]=
        {
            name        = "^00ff00Justice Berry (LV10)^00ff00",
            desc        = "Qualify for the Flameagle Order LV10 quest by reaching a total of 100,000,000 Kytos Honor.",
            preCondDesc = "空",
            mainClass   = 3,
            subClass    = 4,
            awardScore  = 50,
            awardItem   = 0,
            awardMoney  = 0,
            msg = "^ffcb4a%s^ffffff earned the ^00ff00%c<6><%s><>^ffffff achievement! Congratulations!",
            conds=
            {
                {
                  id=3,
                  params={31,100000000,},
    --            descFormat="31,100000000,", 
    --            infoFormat = "%s reaches %d (%d/1)",
                },
            }, 
        },
    }
  2. Press Enter 2x before last "}" and paste in following code
    Code:
        [338]=
        {
            name        = "^00ff00RaGEZONE Test Achievement^00ff00",
            desc        = "All you have to do is kill 7 Ebony Monkeys in Jadeon. No rewards this time.",
            preCondDesc = "空",
            mainClass   = 6,
            subClass    = 1,
            awardScore  = 250,
            awardItem   = 0,
            awardMoney  = 0,
            msg = "^ffcb4a%s^ffffff earned the ^00ff00%c<6><%s><>^ffffff achievement! Congratulations!",
            conds=
            {
                {
                  id=1001,
                  params={584,7,},
    --            descFormat="584,7,", 
    --            infoFormat = "Kill %s (%d/%d) times",
                },
            }, 
        },
    Code should look like this example
    Code:
        [337]=
        {
            name        = "^00ff00Justice Berry (LV10)^00ff00",
            desc        = "Qualify for the Flameagle Order LV10 quest by reaching a total of 100,000,000 Kytos Honor.",
            preCondDesc = "空",
            mainClass   = 3,
            subClass    = 4,
            awardScore  = 50,
            awardItem   = 0,
            awardMoney  = 0,
            msg = "^ffcb4a%s^ffffff earned the ^00ff00%c<6><%s><>^ffffff achievement! Congratulations!",
            conds=
            {
                {
                  id=3,
                  params={31,100000000,},
    --            descFormat="31,100000000,", 
    --            infoFormat = "%s reaches %d (%d/1)",
                },
            }, 
        },
        
        [338]=
        {
            name        = "^00ff00RaGEZONE Test Achievement^00ff00",
            desc        = "All you have to do is kill 7 Ebony Monkeys in Jadeon. No rewards this time.",
            preCondDesc = "空",
            mainClass   = 6,
            subClass    = 1,
            awardScore  = 250,
            awardItem   = 0,
            awardMoney  = 0,
            msg = "^ffcb4a%s^ffffff earned the ^00ff00%c<6><%s><>^ffffff achievement! Congratulations!",
            conds=
            {
                {
                  id=1001,
                  params={584,7,},
    --            descFormat="584,7,", 
    --            infoFormat = "Kill %s (%d/%d) times",
                },
            }, 
        },
    }
  3. Now that you're done with coding part, save file and repack interfaces. Download my Icon setup file and open it with Photoshop. Create your custom Icon, and save it as 338.dds. Make sure you select "explicit alpha" in dropdown menu.
    Daraia - How To: Create Custom Achievements - RaGEZONE Forums
  4. Copy that Icon in surfaces\ingame\achivicon, repack. Run game and new achievement should show up under "Special" | "Special", called RaGEZONE Test Icon
    Daraia - How To: Create Custom Achievements - RaGEZONE Forums
  5. Now that we're done with client-side achievement, we'll work on server-side achievement.

~ Server-side setup
  1. Look for "achieve.txt" and open it in any text editor. Scroll to the bottom, press enter and copy/paste following code
    Code:
    338,,0,0,0,0,0,0,,1001,584,7,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,250,,2,,0,,0,,0
  2. Save, restart server, login. Before updating server-side achievement file, client-side achievement won't work. You can see that by clicking it in Achievements window, it will show as: "Have killed Ebony Monkey (-1/7) times". If it still says that after updating achieve.txt, you probably did something wrong.
  3. If you want to add an item as reward, follow next guide.

~ Creating Achievement with reward (Item used in this tut. - 1098 > Flower) and 2 different monsters.


  1. Scroll to the bottom of "achievement.cfg" file, where you added new Achievement in previous tutorial.
    Code:
        [338]=
       {
            name        = "^00ff00RaGEZONE Test Achievement^00ff00",
            desc        = "All you have to do is kill 7 Ebony Monkeys in Jadeon. No rewards this time.",
            preCondDesc = "空",
            mainClass   = 6,
            subClass    = 1,
            awardScore  = 250,
            awardItem   = 0,
            awardMoney  = 0,
            msg = "^ffcb4a%s^ffffff earned the ^00ff00%c<6><%s><>^ffffff achievement! Congratulations!",
            conds=
            {
                {
                  id=1001,
                  params={584,7,},
    --            descFormat="584,7,", 
    --            infoFormat = "Kill %s (%d/%d) times",
                },
            },
        },
    }
  2. Press Enter 2x before last "}" and paste in following code
    Code:
        [339]=
        {
            name        = "^00ff00RaGEZONE Test Achievement II^00ff00",
            desc        = "All you have to do is kill 7 Ebony Monkeys and  Snouthnose Savages in Jadeon. There's a reward this time.",
            preCondDesc = "空",
            mainClass   = 6,
            subClass    = 1,
            awardScore  = 250,
            awardItem   = 1098,
            awardMoney  = 0,
            msg = "^ffcb4a%s^ffffff earned the ^00ff00%c<6><%s><>^ffffff achievement! Congratulations!",
            conds=
            {
                {
                  id=1001,
                  params={584,7,},
    --            descFormat="584,7,", 
    --            infoFormat = "Kill %s (%d/%d) times",
                },
                {
                  id=1001,
                  params={585,7,},
    --            descFormat="585,7,", 
    --            infoFormat = "Kill %s (%d/%d) times",
                },
            }, 
        },
    Code should look like this example
    Code:
        [338]=
       {
            name        = "^00ff00RaGEZONE Test Achievement^00ff00",
            desc        = "All you have to do is kill 7 Ebony Monkeys in Jadeon. No rewards this time.",
            preCondDesc = "空",
            mainClass   = 6,
            subClass    = 1,
            awardScore  = 250,
            awardItem   = 0,
            awardMoney  = 0,
            msg = "^ffcb4a%s^ffffff earned the ^00ff00%c<6><%s><>^ffffff achievement! Congratulations!",
            conds=
            {
                {
                  id=1001,
                  params={584,7,},
    --            descFormat="584,7,", 
    --            infoFormat = "Kill %s (%d/%d) times",
                },
            },
        },
        
        [339]=
        {
            name        = "^00ff00RaGEZONE Test Achievement II^00ff00",
            desc        = "All you have to do is kill 7 Ebony Monkeys and   Snouthnose Savages in Jadeon. There's a reward this time.",
            preCondDesc = "空",
            mainClass   = 6,
            subClass    = 1,
            awardScore  = 250,
            awardItem   = 1098,
            awardMoney  = 0,
            msg = "^ffcb4a%s^ffffff earned the ^00ff00%c<6><%s><>^ffffff achievement! Congratulations!",
            conds=
            {
                {
                  id=1001,
                  params={584,7,},
    --            descFormat="584,7,", 
    --            infoFormat = "Kill %s (%d/%d) times",
                },
                {
                  id=1001,
                  params={585,7,},
    --            descFormat="585,7,", 
    --            infoFormat = "Kill %s (%d/%d) times",
                }, 
            },
    }
  3. Save, repack, check. It should look like this (Don't mind black title, I messed something up in Achievements inetrface window):
    Daraia - How To: Create Custom Achievements - RaGEZONE Forums


    When you complete your Achievement, a button should show up. There's still some work to be done with Achievement "spoilers", I'll do it sooner or later.


~ Server-side code (
  1. Open "achieve.txt", scroll to the bottom. Copy/Paste it below 338.
    Code:
    339,,0,0,0,0,0,0,,1001,584,7,0,,1001,585,7,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,0,0,0,0,,250,,2,,1098,,0,,0
  2. Save, restart server, test.

If anyone will use custom Achievements, you will also require slightly modified Achievements window - Optional. I've already taken care of what it looks like, so
all you have to do is download it and replace with existing achievement xml files in interfaces.pck. - I will upload them once I get on my other PC.
What I've changed:
- Aligned text with Progress bars
- Enlarged Achievement "spoilers" - Reason: Reward Icon is quite big, was kind of out from the "spoiler", had to increase it's size.
- Moved Received Points location - Reason: Reward Icon and Button
- Moved "Send Link" Button - Reason: More space and it looks better in my opinion.

[strike]I haven't yet figured out how to add Icons, but my theory would be naming Icons by Achievement ID. Haven't tested that yet.[/strike] There are still no screenshots, lol. If anyone will try that out, please do share them. And make sure you also report any errors and paste both server side and client side codes so I'll check them out and see what's wrong.

I hope that someone will figure out how to pull acquired achievement Points from Client/Server/find them in SQL to make custom Achievement reward shop like
official Jade Dynasty had and obviously share that. That could make game customization even better.

Yay, I included Gold to Copper converter.
View attachment Gold-To-Copper.zip

Update:

I tested my icon theory and it actually works. All you have to do is make an icon and name it same as the achievement ID you want to use it for.

Here's a basic icon setup for new Icons (.psd) - There's also Alpha layer, so make sure you save as DXT3 - ARGB 8 bbp | explicit alpha, save as .dds - you'll need to save/edit .dds extensions.
View attachment 157059

Update 2:

Translated "Completed" GFX image that appears upon completion of Achievements. I'll upload it bit later, I think image is slightly too big.

Preview
Daraia - How To: Create Custom Achievements - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Last edited:
Junior Spellweaver
Joined
Nov 16, 2013
Messages
102
Reaction score
21
Update:

I tested my icon theory and it actually works. All you have to do is make an icon and name it same as the achievement ID you want to use it for.

Here's a basic icon setup for new Icons (.psd) - There's also Alpha layer, so make sure you save as DXT3 - ARGB 8 bbp | explicit alpha, save as .dds - you'll need to save/edit .dds extensions.
View attachment Achievement_Icon_Setup.zip
 

Attachments

You must be registered for see attachments list
Back
Top