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).
How an event is defined
Section titled “How an event is defined”[common]max_event = 59
[event_3]active = 1type = 3mode_category = 1
start_year = 2026start_month = 11start_date = 20start_hour = 11
end_year = 2026end_month = 12end_date = 4end_hour = 23
max_value = 4value_1 = 50value_2 = 1222221value_3 = 16value_4 = 23
max_use_channeling_type = 1use_channeling_type1 = -1- The loader reads
[event_1]to[event_<max_event>]. A section withactive = 0(or noactive) is skipped and logged as inactive. typeis the event type. It selects the code that runs the event (EventTypeinioEventManager.h). Several sections may use the same type (the shipped files have four EXP events, all type 3).start_year,start_month,start_date,start_hourand the same four withend_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.max_valueis how manyvalue_Nlines are read. Their meaning depends on the type.use_channeling_typeNlimits the event to a login channel.-1means everybody.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.
The value lines of the EXP event (type 3)
Section titled “The value lines of the EXP event (type 3)”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.
Common event types
Section titled “Common event types”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.
Start, change or stop an event
Section titled “Start, change or stop an event”- Open the server
sp2_event.ini. Find the section of the type you want, or copy a section and give it the next number. - Set
active = 1, the dates and the values. Raisemax_eventif you added a section. - To stop an event, set
active = 0, or set an end date in the past. - Restart the game server. The server source has a reload path for events (
ioEventManager::LoadINIwith a “create” flag), and the 2014 reload list file namesRELOAD_EVENT. How to trigger a live reload is not confirmed yet. - Check the server log. It prints “Event N is active” and, at test log level, the window and the values.
The standing EXP event
Section titled “The standing EXP event”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 |
Gifts for gift events
Section titled “Gifts for gift events”Gift-type events (for example type 20, 29) take their rewards from sp2_event_present.ini:
[EventPresent]Change = 1PresentSendID = EventPresentAlarm = 1PresentPeriod = 7MaxItem = 1
Event1_Type = 20Event1_Rand = 0Present1_Type = 3Present1_Value1 = 1000021Present1_Value2 = 10Present1_Ment = 138Present1_Always = 1EventN_Typeis the event type fromsp2_event.ini.EventN_Randis the chance weight when one type has several gifts.PresentN_Type,PresentN_Value1andPresentN_Value2are the gift, with the same meaning as in the quest rewards (see the table in Quests and Missions).PresentN_Mentis a text index.PresentN_Always = 1is read as “always give”.PresentN_Receive_TypeandPresentN_Send_Cntare also read. What the last three change in play is not confirmed yet.PresentPeriodandPresentAlarmapply to every gift in the file. The unit ofPresentPeriodis 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.
Client text
Section titled “Client text”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 = 28start_announce_1 = Text shown when the event startsstart_color_1 = 0xFFFF50FAweek_on_off_1 = 2222222start_hour_min_1 = 2300end_hour_min_1 = 2400event_typeis the same type number as on the server.week_on_off_Nuses the same seven digits as the server (2is on).start_hour_min_Nandend_hour_min_NareHHMM.[EVENT_UI_HELP]holdstitle_Nanddesc_Nfor the event window.#in a description is a line break.- For
STR(n)keys and%1or%sin these texts, see Text and Languages.
Differences between versions
Section titled “Differences between versions”| 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.
