Skip to content

Events

Events are switched on and off by dates. The server decides when an event is alive and tells the clients. This page covers the event table, the gift table that events use, and the client announcement text.

File Side What it holds
sp2_event.ini Server (ls_gamesvr\config\) The event table: [common] and [event_N]
sp2_event_present.ini Server Gifts that gift-type events hand out
sp2_event_fishing_present.ini Server Gifts of the fishing event
sp2_event.ini Client Announcement text ([announce_N]) and event help text
sp2_quest_info.ini Server and client Event quests, see Quests and Missions

Client paths were checked in the unpacked 2021 client. In 2014 and 2019 the client file is inside rs.iop, which was not opened for this page. Edit packs with the pack tutorials and edit an INI table.

Code: ioEventManager.cpp (server, EventNode::LoadINI and ioEventManager::LoadINI) and ioPresentHelper.cpp (gifts).

[common]
max_event = 59
[event_3]
active = 1
type = 3
mode_category = 1
start_year = 2026
start_month = 11
start_date = 20
start_hour = 11
end_year = 2026
end_month = 12
end_date = 4
end_hour = 23
max_value = 4
value_1 = 50
value_2 = 1222221
value_3 = 16
value_4 = 23
max_use_channeling_type = 1
use_channeling_type1 = -1
  1. The loader reads [event_1] to [event_<max_event>]. A section with active = 0 (or no active) is skipped and logged as inactive.
  2. type is the event type. It selects the code that runs the event (EventType in ioEventManager.h). Several sections may use the same type (the shipped files have four EXP events, all type 3).
  3. start_year, start_month, start_date, start_hour and the same four with end_ are the window. The event is alive from the start hour to the end hour (IsCheckAlive). The server checks the clock and sends an “event alive” message to every client when the state changes.
  4. max_value is how many value_N lines are read. Their meaning depends on the type.
  5. use_channeling_typeN limits the event to a login channel. -1 means everybody.
  6. mode_category (EXP and similar events) limits the bonus to a kind of mode. The comment in the file says: 1 battle, 2 ladder (tournament), 3 today’s mode, 4 monster dungeon and skeleton hero.

Taken from the comments in the shipped [event_3]:

Key Meaning
value_1 Bonus experience in percent. 20 gives 20 percent more
value_2 Seven digits for Sunday to Saturday. 1 no event that day, 2 event on that day
value_3 Start hour
value_4 End hour

The same section can carry a second block of days and hours (value_5 to value_7, commented out in the shipped file). The layouts of other types, including the peso event (type 4), are only in the comments of their own sections and were not checked.

From EventType:

Type Name in code Type Name in code
3 EVT_EXP 20 EVT_ONE_DAY_GIFT
4 EVT_PESO 23 EVT_ENTRY
5 EVT_PLAYTIME 28 EVT_ANNOUNCE
10 EVT_PCROOM_BONUS 29 EVT_ENTRY_AFTER
13 EVT_DORMANCY_USER 33 EVT_EXP2
14 EVT_PLAYTIME_PRESENT 34 EVT_PES02 (peso 2)
16 EVT_BUY_ITEM 39 EVT_PRESENT_BUY
17 EVT_FISHING 40 EVT_FREEDAY_HERO
19 EVT_CONNECTION_TIME 41 EVT_PRESENT_BUY_2

The enum runs to 44. Types 32, 39, 41 and 42 have their own classes in the loader; the rest use the plain event node.

  1. Open the server sp2_event.ini. Find the section of the type you want, or copy a section and give it the next number.
  2. Set active = 1, the dates and the values. Raise max_event if you added a section.
  3. To stop an event, set active = 0, or set an end date in the past.
  4. Restart the game server. The server source has a reload path for events (ioEventManager::LoadINI with a “create” flag), and the 2014 reload list file names RELOAD_EVENT. How to trigger a live reload is not confirmed yet.
  5. Check the server log. It prints “Event N is active” and, at test log level, the window and the values.

The shipped [event_3] is active from 2015 to 2050 with value_1 = 200. By the comments that is 200 percent extra experience, Monday to Friday, 16:00 to 23:00, in battle modes. Check the active events before you judge your own tests. Active events by version:

Version max_event Sections Active
2014 55 55 24
2019 59 57 28
2021 59 57 28

Gift-type events (for example type 20, 29) take their rewards from sp2_event_present.ini:

[EventPresent]
Change = 1
PresentSendID = Event
PresentAlarm = 1
PresentPeriod = 7
MaxItem = 1
Event1_Type = 20
Event1_Rand = 0
Present1_Type = 3
Present1_Value1 = 1000021
Present1_Value2 = 10
Present1_Ment = 138
Present1_Always = 1
  1. EventN_Type is the event type from sp2_event.ini. EventN_Rand is the chance weight when one type has several gifts.
  2. PresentN_Type, PresentN_Value1 and PresentN_Value2 are the gift, with the same meaning as in the quest rewards (see the table in Quests and Missions).
  3. PresentN_Ment is a text index. PresentN_Always = 1 is read as “always give”. PresentN_Receive_Type and PresentN_Send_Cnt are also read. What the last three change in play is not confirmed yet.
  4. PresentPeriod and PresentAlarm apply to every gift in the file. The unit of PresentPeriod is not confirmed yet.

The gift code of an item must exist in the item tables (for example sp2_etcitem_info.ini). A wrong code was not tested.

The client sp2_event.ini holds the announcements shown for an event (ioEventManager.cpp in the client reads [announce_common] max and [announce_N]):

[announce_common]
max = 1
[announce_1]
event_type = 28
start_announce_1 = Text shown when the event starts
start_color_1 = 0xFFFF50FA
week_on_off_1 = 2222222
start_hour_min_1 = 2300
end_hour_min_1 = 2400
  • event_type is the same type number as on the server.
  • week_on_off_N uses the same seven digits as the server (2 is on).
  • start_hour_min_N and end_hour_min_N are HHMM.
  • [EVENT_UI_HELP] holds title_N and desc_N for the event window. # in a description is a line break.
  • For STR(n) keys and %1 or %s in these texts, see Text and Languages.
Point 2014 2019 2021
Size of server sp2_event.ini 44 KB 53 KB 53 KB
Extra file sp2_event_1.ini (copy) none none
Losa Day and cashback dates in [common] 2016 2020 2020
sp2_event_goods*.ini (event shop) in the server folder Present Not present Not present

In 2019 and 2021 the testbed has sp2_event_present.ini but no event shop files. The event shop is handled by the main server (ls_mainsvr), which this page did not cover. Not confirmed yet.