Quests and Missions
Lost Saga has two systems that look alike in the lobby but use different files.
| System | What it is | Server file | Client file |
|---|---|---|---|
| Quests | Long quests and time-limited event quests | sp2_quest_info.ini |
sp2_quest_info.ini, sp2_quest_help.ini |
| Missions | Daily, weekly and monthly lists that reset on a schedule | sp2_daily_mission.ini, sp2_weekly_mission.ini, sp2_monthly_mission.ini |
the same three names |
| Rewards (both) | The gift a quest or mission pays | sp2_quest_present.ini |
sp2_quest_present.ini |
Server files are in ls_gamesvr\config\. Client paths were checked in the unpacked 2021 client. In 2014 and 2019 the client files are inside rs.iop, which was not opened for this page. Edit packs with the pack tutorials and edit an INI table.
The server decides what counts and what is paid. The client only shows names, texts and icons. A quest that exists on the server but not in the client file has no title and no help text.
Quests
Section titled “Quests”Code: ioQuestManager.cpp and QuestVariety.cpp (server), ioQuestManager.cpp (client).
How a quest is defined
Section titled “How a quest is defined”[common]max_quest = 15000
[quest1]class_name = QuestPlayTimeCountmain_index = 1max_sub_quest = 1
sub1_title = My eventsub1_perform_type = 2sub1_start_year = 2026sub1_start_month = 11sub1_start_date = 20sub1_start_hour = 5sub1_end_year = 2026sub1_end_month = 12sub1_end_date = 4sub1_end_hour = 5sub1_occur_value = 1sub1_complete_value = 1sub1_max_reward = 1sub1_reward_present1 = 824- The server reads
[quest1]up to[quest<max_quest>]. A section with an emptyclass_nameis skipped. class_namepicks the code that counts progress. The full list is inCreateQuestinioQuestManager.cpp(for exampleQuestPlayTimeCount,QuestRealTimeCount,QuestBuyItem,QuestGangsiKill,QuestExcavationTry,QuestSoccerGoal,QuestGuildLevel). An unknown name is logged as “None Class” and the quest is not created.main_indexis the quest line. EachsubK_*block is one step.max_sub_questis the number of steps.subK_perform_type:1normal quest,2event quest. The start and end dates (start_year,start_month,start_date,start_hourand the same forend_) are only read for event quests. A quest outside its window is not alive.subK_occur_valueandsubK_complete_valueare the numbers the class compares with, for example minutes or counts.subK_custom_valueNare extra class values. What each value means depends on the class and is not confirmed yet per class.- Other keys the server reads:
oneday_style,oneday_cnt,repeat_style,guild_style,pcroom_style,channeling_type,occur_mode,complete_mode,period_hour,rewardselect_style,rewardselect_num,prev_main_index,prev_sub_index,next_main_index,next_sub_index.
Add or change a quest
Section titled “Add or change a quest”- Copy a block from the same class that is close to what you want. Give it a new
[questN]number and a newmain_index. - Raise
max_questif you went past the current number (the shipped file already says15000). - Set the dates, the values and the reward (see Rewards below).
- Add the same quest to the client
sp2_quest_info.iniwith the texts (see Text below). The client reads the same section and key names. - Restart the game server and the client.
sp2_one_day_quest.ini (oneday_hour, oneday_current) is written by the server for the daily quest reset. Do not edit it by hand.
sp2_quest.ini (tutorial quests with Name, QuestFun, ClearTermFun) is in all three testbeds, but no code in the 2021 game server source reads it. Whether the client reads it is not confirmed yet.
Missions
Section titled “Missions”Code: MissionManager.cpp (server).
How the lists work
Section titled “How the lists work”[common]reset_hour = 5close = 0max_count = 394
[date1]start_date = 201223
mission1_code = 1mission1_type = 12mission1_values = 4mission1_present = 12580[dateN]blocks are the rotation.start_dateisYYMMDD(201223is 2020-12-23). The server picks the block that is current for today. Weekly blocks also haveend_date.- Inside a block,
missionK_codemust be unique and must not be0: the loader stops at the firstmissionK_codethat is0. missionK_typeis the class of the mission (enumMissionClassesinMissionTriggerBase.h):
| Type | Meaning | Type | Meaning |
|---|---|---|---|
| 1 | Login time | 9 | Item reinforce |
| 2 | Fishing | 10 | Mode play |
| 3 | Collect peso | 11 | Daily missions completed |
| 4 | Monster kill | 12 | All daily missions cleared |
| 5 | Item buy | 13 | Weekly missions completed |
| 6 | Clover | 14 | All weekly missions cleared |
| 7 | Excavation | 15 | All monthly missions cleared |
| 8 | Item use | 16 | Additive use |
missionK_valuesis a list of numbers separated by dots, for example4(a count) or1.90000.6.28. What each position means is not confirmed yet, except that the first number is the target count in the shipped examples.missionK_presentis a reward index insp2_quest_present.ini(MissionManager.cppcallsg_QuestMgr.SendRewardPresent). It is not an item code.reset_houris the hour of the daily reset.close = 1turns all missions off (the server logs “mission is closed”).max_countcaps the number of date blocks (default 1000 if0).
Dates have run out
Section titled “Dates have run out”The last block in the shipped files starts on 2022-01-20 (2019 and 2021 daily), 2022-01-02 (2014 daily), and weekly and monthly end in 2021 to early 2022. By the code in IsPrevMissionData, a daily block that started more than a day ago and has no later block is treated as old and is not activated. So the shipped missions probably stay empty today. Add new [dateN] blocks with current dates. Not tested in game yet.
Add a mission
Section titled “Add a mission”- Add a new
[dateN]block at the end with the next number and a currentstart_date. Daily and weekly rotate one block per day or week, so one block per period is needed. - Raise
max_countif you pass it. - Add the same block to the client file with the texts.
- Restart the game server.
Rewards
Section titled “Rewards”sp2_quest_present.ini, loaded by ioQuestManager.cpp:
[common]max_present = 30000
[Present1]RewardIndex = 1PresentSendID = EventPresentType = 8PresentAlarm = 0PresentMent = 1010PresentPeriod = 28PresentValue1 = 10PresentValue2 = 0PresentDirect = 1- The loader reads
[Present1]to[Present<max_present>]and files each under itsRewardIndex. Quests and missions point at that number, not at the section number. PresentTypeand the values (from the header of the file):
| Type | Gift | Value1 | Value2 |
|---|---|---|---|
| 1 | Hero | Class code | Period in hours |
| 2 | Deco | Sex | Code |
| 3 | Etc item | Code | Amount |
| 4 | Peso | Amount | not used |
| 5 | Gear | Code | (reinforce x 10000) + period in hours |
| 6 | Gear box | Code | Resale price |
| 7 | Deco, player chooses | not confirmed yet | not confirmed yet |
| 8 | Experience | Amount | not used |
| 9 | Medal | Code | Period in hours |
PresentSendIDis the sender name shown on the gift.PresentDirect = 1is read as the “direct reward” flag (m_bDirectReward). What it changes in play is not confirmed yet.PresentAlarm,PresentMent(a text index) andPresentPeriodalso come from this file. The unit ofPresentPeriodis not confirmed yet.- Copy the same reward to the client
sp2_quest_present.ini.
Text (titles, help, mission captions)
Section titled “Text (titles, help, mission captions)”- Quest text is in the client
sp2_quest_info.ini:subK_title,subK_progress,subK_progress_result,subK_icon, andsubK_help.subK_helpis a number: it points at a[helpN]block with the sameindexin the clientsp2_quest_help.ini. That file is a list of lines, each withlineJ_text1,lineJ_color1,lineJ_size. - Mission text is in the client mission files:
missionK_title1_text1,missionK_title2_text1,missionK_present_text1to_text4,missionK_icon,missionK_back_frame_type. - The shipped 2021 client mission and quest files are still mostly Korean text. Texts can be plain English. For
STR(n)keys and%1or%ssee Text and Languages.
Differences between versions
Section titled “Differences between versions”| Point | 2014 | 2019 | 2021 |
|---|---|---|---|
sp2_quest_info.ini size |
3.9 MB | 4.9 MB | 4.9 MB |
| Daily blocks | 364, to 2022-01-02 | 394, to 2022-01-20 | 394, to 2022-01-20 |
| Weekly blocks | 52 | 56 | 56 |
| Monthly blocks | 12 | 13 | 13 |
| Extra files in the server config folder | sp2_quest_help.ini, sp2_quest_guide.ini (client files) |
none | none |
The mission and quest loaders were read in the 2021 source only. That the 2014 and 2019 servers read the keys the same way is not confirmed yet.
