This tutorial should give an understanting about how to create new quests with AAEmu
We are going to create a repetitive quest (the player can do multiple times) that gives you exp when you kill a number of mobs, and ends automatically once completing
To start, you should download the items below:
The Latest AAEmu Tools from ZeromusXYZ
For following steps, you should open the server compact.sqlite3 file with DB Browser, clicking in Open Database
For this, I created an NPC with id 8000100, if you want to learn how to create a NPC, I advise you follow Dahak tutorial:
You can skip the last part about scheduling the NPC
First we should create the Quest Context, open quest_contexts table and insert a row
I will explain all the fields
- id: Insert 8000100 to keep it consistent and easy to find
- name: Insert the quest name, in this case, I will put Repetitive Quest Hellswamp
- category_id: The quest category, I will insert 44 to be an adventure
- repeatable: If the quest should be repeatable, in this case insert t (true) since we are creating a repetive quest
- level: The quest level, I will put 35
- selective: f (false)
- successive: f (false)
- restart_on_fail: f (false)
- chapter_idx: Insert 0
- quest_idx: Insert 0
- milestone_id: I usually insert here the same id as the quest 8000100
- let_it_done: f (false)
- detail_id: 1
- zone_id: The quest zone, since its Hellswamp,insert 26 (You can find the zone id in the zones table)
- degree: 3
- use_quest_camera: t
- score: 0
- use_accept_message: t
- use_complete_message: t
- grade_id: 1
- translate: t
Open the table localized_texts and add a new entry
- id: insert an unique id, I will insert 8000101
- tbl_name: It should reference the quest_contexts table
- tbl_column_name: It should reference quest_contexts name column
- idx: the context ID, 8000100
Now, in the fields ko, en_us.. etc you can insert the translations, for the fields that ends with _ver, leave ko_ver at 1 and the rest at 0
For our quest, It will have 3 components
- Start: How the player accepts the quest
- Progress: The quest objective
- Reward: What to do when the objective is complete (gives exp, auto completes the quest)
So we should create 3 quest components entries on table quest_components
- id: insert three unique IDs, one for each component, I will insert 8000100 (start), 8000101 (progress) and 8000102 (reward)
- quest_context_id: 8000100, the id of the quest context
- component_kind_id: 2 for the Ready component, 4 for the progress component, 8 for the reward component
- next_component_id: Insert 0
- npc_ai_id: Insert 1
- npc_id: Leave this NULL
- skill_id: Leave this NULL
- skill_self: Insert f (false)
- ai_path_name: Leave this NULL
- ai_path_name: Insert 0
- sound_id: Leave this NULL
- npc_spawner_id: Insert 0
- play_cinema_before_bubble: Insert t (true)
- ai_command_set_id: Leave this NULL
- or_unit_reqs: Insert f (false)
- cinema_id: Leave this NULL
- summary_voice_id: Leave this NULL
- hide_quest_marker: Insert f (false), since we want to show the quest marker
- buff_id: Leave this NULL
This will be the text that will be displayed while the player is killing the mobs
For this, open quest_component_texts table and create a new entry
- id: For consistency, I will insert the progress quest component id, 8000101
- quest_component_text_kind_id: Insert 4 (Progress Kind)
- quest_component_id: The quest component Id, 8000101
- text: The text that will be displayed, in this case, "Eliminate Mobs, or Eliminate @NPC_NAME(9217)", 9217 is the mob template Id for Sarracenia
You can also create a new entry on localized_texts for the quest_component_texts.text, it its just like the quest_contexts.name that we added before, changing the tbl_name and tbl_column_name
Now, we will create 4 component acts
- QuestActConAcceptNpc, for the Start component, it progresses when you accept the quest from the NPC
- QuestActObjMonsterHunt, for the Progress component, it progresses when you hunt a x amount of mobs
- QuestActSupplyExp, for the Reward component, it gives exp for the player
- QuestActConAutoComplete, for the Reward component, it auto finalizes the quest, because we want the quest to end when the player finish killing all the mobs
To create this, we will insert 4 new entries into the quest_acts table
- id: insert an unique id for each act: 8000100, 8000101, 8000102, 8000103
- quest_component_id: insert the quest component id, the first one will be 8000100 (start), the second one will be 8000101 (progress) and the third and fourth 8000102 (reward)
- act_detail_id: this references each act table, for consistency will insert the same as the id, we will create the acts below
- act_detail_type: act type, it should be QuestActConAcceptNpc for the first one, QuestActObjMonsterHunt for the second, QuestActConAutoComplete for the third and QuestActSupplyExp for the fourth
Open quest_act_con_accept_npcs and create a new entry
- id: Insert the same one for this act type that you created above in table quest_acts, in this case 8000100
- npc_id: The id of the npc that you created for this quest, 8000100
Open quest_act_obj_monster_hunts and create a new entry
- id: Insert the same one for this act type that you created above in table quest_acts, in this case 8000101
- npc_id: The id of the mob that should be killed, 9217
- count: The amount of mobs that you should kill, I will insert 20, but its up to you
- use_alias: Insert f (false), from what I saw, this is used for mob groups
- quest_act_obj_alias: Leave this NULL
- highlight_doodad_phase: Insert -1
- highlight_doodad_id: Leave this NULL
Open quest_act_con_auto_completes and create a new entry
- id: Insert the same one for this act type that you created above in table quest_acts, in this case 8000102
Open quest_act_supply_exp and create a new entry
- id: Insert the same one for this act type that you created above in table quest_acts, in this case 8000103
- exp: The amount of exp the quest should give, I will insert 20000
This will be the text that shows up when you interact with NPC
To create this, open quest_chat_bubbles table
- id: Unique Id, I will insert 8000100
- quest_component_id: The Id of the start quest component from quest_components table, 8000100
- text: The text that will be displayed in the conversation
- npc_id: The Id of the NPC, 8000100
- next_bubble: : 0
- is_start: : t (True)
- sound_id: Leave this NULL
- npc_spawner_id: Insert 0
- angle: Insert 0
- chat_bubble_kind_id: Insert 1
- facial: The NPC expression, I will insert npc_angry
- npc_group_id: Leave this NULL
- camera_id: Leave this NULL
- change_speaker_name: Leave this NULL
You can also localize quest_chat_bubbles.text in the localized_texts table
Now you should already have a fully function mob kill repetitive quest :D
Dahak for creating the NPC tutorial
ZeromusXYZ for building the awesome AAEmu Tools