2019 Source (213 heroes)
Access: Public, Contributor, Core
Read Before You Start first. This page only covers what is specific to the 2019 source.
Quick facts
Section titled “Quick facts”| Heroes | 213 |
| Visual Studio | 2010 (toolset v100), Win32 |
| Database scripts | Yes: base scripts from 2012 plus feature patches from 2017 to 2019 |
| Server config files | Only server-config\ls_gamesvr\config\: shop and gacha configs that match the client |
ls_query.ini |
Not included (the example set has one) |
| Client | Separate download: Gemscool Indonesia client (2019), modified, see Client |
Repository layout
Section titled “Repository layout”| Folder | What is in it |
|---|---|
win\ |
All solutions, with server and library projects in win\projects\ |
src\ |
Source code: servers, client, engine, launcher (LSAutoUpgrade), LSWebBroker, tools |
lib\ |
Prebuilt libraries and DLLs. lib\lib_Shipping\ holds the Shipping engine build. |
extra\ |
About 30 small tools, plus extra\lib (libcurl, OpenSSL, LS_NXSoap, LS_RestAPI) used by the billing server |
etc\Library\ |
Bandi video and OggVorbis SDKs used by the client |
sql\20120504\ |
Base database scripts |
DB\ |
Dated feature patches from 2017 to 2019 |
Database
Section titled “Database”-
Create the database
LosaGame. The servers also use a log database (LosaLogData); check which scripts create its tables before you rely on it. -
Run the base scripts from
sql\20120504\in this order:lostsaga_tb.sql(tables),lostsaga_sp.sql(stored procedures),lostsaga_etc.sql. They are the same files as in the 2014 source. -
Apply the feature patches in
DB\, one folder at a time in date order. Inside each folder, run the table scripts first (userGameDB.sql,user*DB*.sql), then the procedures (game_*.sql). Alphabetical order runs the procedures first, and they fail because their tables and columns do not exist yet.
What to expect
Section titled “What to expect”Tested on SQL Server 2022 with a fresh database:
- Base scripts: all 62 tables, and 538 of 560 stored procedures. 22 procedures fail with “Invalid column name” because they expect newer table columns. One view fails because it needs
LosaGame_log. - Patches: “Cannot drop … does not exist” messages on a fresh database are harmless. That is the
DROPbefore theCREATE. game_practice_rank_Reward_Cursor.sqlhas a syntax error and needs fixing.CREATE USERfails until thelstggameandlstgweblogins exist.
Things specific to 2019
Section titled “Things specific to 2019”- Partly retargeted projects.
iocpSocketDLL,ioPacandLSAutoUpgradewere set to Windows SDK 10.0 at some point. If Visual Studio 2010 complains, set them back to the default SDK. - Client Debug sheet.
src\LSClient\DebugSheet.propscopies the client toC:\LosaMyDevand expects files inC:\Bonus\lib\. Create those folders or edit the property sheet. - Fixed output folders. Some Debug builds write to
D:\LostSaga\Korea\Server\...orD:\Work\trunk\build\.... Change the Output Directory if you do not have those drives or folders. - Server output goes to
build\zone_dev\<server>\(Debug) orbuild\zone_dist\<server>\(Release), one level above the repository. The game server’s post-build step also writesls_gamesvr1.exeandls_gamesvr2.execopies for running several game servers. - Older server generation.
MainServer,SP2GameServer,DBAgentServerandBillingRelayServerare an older version of the same servers. Use thels_*servers. LSClientMTandio3DEngineMTare parallel variants that no solution uses. Their purpose is not known yet.
Client
Section titled “Client”The client for this release is a modified Gemscool Indonesia client from 2019 (about 1.4 GB), shared as a separate download, not in Git. The source tree itself looks like a Korean build, so expect differences in protocol or text between the two until someone checks them.
-
Game data is packed in
rs.iopandmap.iop. -
The programs are rebuilt from this source (Release):
lostsaga.exe,io3dengine.dll,iofreetype.dll,lslog.dll,townportal.dllandiopac.dll. The other DLLs come from the source tree’slib\folder and from the DirectX June 2010 and VC++ 2010 redistributables.bdcap32.dll(in-game video recording) andflash9f.ocx(Flash windows) are kept from the original client. -
Removed: GameGuard, hshield, the launcher, web broker and patcher files, the uninstaller, crash dumper, shortcuts and DLLs the rebuilt programs do not use, plus personal files (saved login, logs, patch cache).
-
The packs were cleaned without losing anything the client can load:
Pack Dropped rs.iop299 older copies of files that a later copy in the same pack replaces map.iop887 older copies, 9 910 files that rs.iopalso has (searched first, so never loaded), 803 misplaced copies intexture\andresource\text\that exist byte for byte in the normal folders16 files in
map.iop’stexture\folder and one effect file inresource\text\were kept because they differ from the copies in the normal folders. The client does not load from those paths. -
The original
lostsaga.pdbmatches the originallostsaga.exeonly, so it does not help with the rebuilt one. -
There is no launcher. Start
lostsaga.exewith the launch argument from your own login server, or with the debug login in Before You Start. This Release build is not a shipping build: the 3rd character of the options field must be1so it readsrs.iopandmap.iop.info\autoupgrade_info.iniandinfo\start.inistill name the old Gemscool hosts.
Build test results
Section titled “Build test results”The community repository has a few small fixes on top of the original release. PATCHES-LosaDev.md at the repository root lists every one of them. Built on 2026-11-07 from that repository in Release|Win32 with the v100 toolset, the Version.h fix and static-runtime Boost:
| Solution | Result |
|---|---|
ioINILoader, Log, LogDLL, FrameTimerDLL, iocpSocketDLL, LSLog, SharedContainer, PerfMon, TownPortal, ioFreeType |
Build |
io3DEngine |
Builds |
ls_dbagent, ls_mainsvr, ls_billingsvr, ls_gamesvr, ls_relaysvr, ls_loginsvr, ls_filewritesvr |
Build |
LSClient |
Builds LostSaga.exe in src\LSClient\Release\ (about 5 minutes) |
ioPac |
Builds (with the BigPac fix below) |
Release output folders differ per server: ls_dbagent, ls_loginsvr and ls_filewritesvr go to build\zone_dev\, the others to build\zone_dist\.
What the fixes were
Section titled “What the fixes were”ls_relaysvrfailed withC2661:Manager.cppcalledUDPNode::InitMemorywith 5 arguments, butiocpSocketDLL(source and prebuilt library) only has 3- and 7-argument versions, and no other version exists anywhere in the tree. The 2014 relay server has the same line with the last two arguments commented out, so the repository now does the same:InitMemory(3000,16384*2,6000/*,6000,1000*/).LogDLLandFrameTimerDLLcopy their DLL intobuild\zone_office\...after building. That step now skips folders that do not exist instead of failing the build.ioFreeTypelinked../LSLog/bin/LSLog.lib, a folder this release does not have (LSLogbuilds intolib\).src\ioFreeType\StdAfx.hnow points at../../lib/.ioPacdid not compile:BigPac.cppis newer thanBigPac.h(the header is the 2014 one) and uses members and functions the header does not declare.BigPac.hnow declares them, andOpenBigPacAll(IOP Manager only) is wrapped in#ifdef STATIC_PAC_APIlike the function it calls. The rebuiltiopac.dllexports everything the original did.
Placeholders in the repository
Section titled “Placeholders in the repository”Real addresses, keys and accounts were taken out of the code before it was shared. PATCHES-LosaDev.md lists every file:
- Public IP addresses the code connects to are
127.0.0.1; where the code compares the server’s own IP against a fixed list, the address is192.0.2.1(reserved, never matches). - Publisher, operator and game-service host names (Nexon, Gemscool, Z8Games, Garena, PlayPark, Valofe, OGPlanet, Daum, the old
lostsaga.comweb, patch and CDN hosts and others) are gone: URLs start withhttp://127.0.0.1/and keep their path, bare host names areexample.invalid, and staff e-mail domains are@example.invalid. - Passwords, API keys, app ids, hash keys, login tokens, test accounts and anti-cheat license strings are
CHANGE_ME. - Vendor SDK binaries (XTrap libraries,
bxIPGClient.dll) are not included. The billing server uses a small stand-in header forbxIPGClient, so it still builds; the Japan IPG and Adbill billing calls just fail.
Point these at your own servers when you need them. The pack passwords and the client/server protocol keys were kept, because the game needs them.
Run it locally
Section titled “Run it locally”Tested on 2026-11-07 on one Windows PC: all nine servers start and the client logs in to the lobby. Buying and full matches are not tested yet.
-
Database. Use the 2021 release’s full scripts (
LosaGame.sql,LosaGame_Log.sql,LosaLogData.sql), not this release’s own. The 2019 scripts are a 2012 base with a few patches, and 212 of the 401 stored procedures the 2019 server calls are missing there; login fails atgame_member_count. The 2021 schema matches all but 8. Then rundb\losadev-2019-procs.sqlfrom the ZIP (addsgame_member_count,game_member_add,game_create_nickname,game_pingpong, and the Indonesia version ofgame_game_get_data) and insert one row intodefine_encode_key(any 15 digits). -
Build the servers (Release|Win32). The community repository already has the four source fixes below.
-
Configs. Unpack the ZIP’s
server-config\, copy each.exeplusiocpSocketDLL.dll,frametimerdll.dll,CrashFind.dll(andGAuthClientDLL.dllfor billing) fromlib\into its folder. Gameplay tables:ls_gamesvr\config\andls_mainsvr\config\from the 2021 config set,GoodsList.ini/GoodsName.inifromsrc\ls_billingsvr\config\(the 2021 ones stop the billing server). -
Start in this order, each from its own folder: the three DB agents, main, billing, game, relay, login, file write server.
-
Client. Start
lostsaga.exewith the launch line below.
Values that matter for 2019
Section titled “Values that matter for 2019”- Locale Indonesia. The 2019 client is the Gemscool Indonesia client and its packs only open with the Indonesia pack password, so the client runs the Indonesia locale and the servers must too:
[Local] Version=938400398inls_config_game.iniandls_config_billingsvr.ini. A mismatch givesCONNECT_WRONG_LOCAL_VER. - Local login.
ls_billingsvr.ini[Test] TestMode=1: the billing server accepts every ID without asking the publisher and gives a test cash balance. Passwords are not checked. - IDs are 6 to 12 characters (letters, digits,
-,_), an Indonesia rule. A new ID creates its account on the first login; the client then asks for a nickname. - GM: put the account’s nickname in
ls_gamesvr\config\sp2_developerID.iniunder[ID]. [SECURITY] ON=1inls_config_game.ini: the client always sends checksummed, encoded packets.ls_query.ini: the 2021 map with ids 164 and 1016 taken from the 2014 map. Ids 300, 2093 and 2094 have no known procedure.- Dice event table. The game server stops at start without
config\tables\LSC_SnakeLadders_Move.datandLSC_SnakeLadders_Reward.dat. The move table is in the 2019 client’smap.iop(resource/tables/). No released reward table has the version this server expects (0x3baf8); a 20-byte file with that version and no rows works (dice event without rewards). - Addresses. The servers bind to the PC’s own IPv4 address (the first address its host name resolves to), not to
127.0.0.1and not to a configured address. On a single PC, use that address inglobal_define.iniand the relay/login server lists, and let the client connect to it.
Source fixes in the repository
Section titled “Source fixes in the repository”If you start from the original release, make these yourself:
| File | Change | Why |
|---|---|---|
src\ls_gamesvr\Local\ioLocalParent.cpp, src\LSClient\Local\ioLocalParent.cpp |
IsRightLicense() never expires |
The Indonesia license date (2013 server, 2012 client) has passed: the game server exits (“This program has expired”), the client shows “Your license has com up for renewal”. |
src\ls_billingsvr\LoginManager\LoginManager.cpp |
In CheckLogin(), move the Indonesia TestMode success branch before the pInfo == NULL check |
Without the launcher’s earlier login nothing is in the login list, so every TestMode login failed. |
src\ls_gamesvr\NodeInfo\UserNodeManager.cpp |
Skip the two __OHTG_LOGIN_IP_CHECK__ comparisons when no IP key was decrypted |
The Indonesia locale never decrypts an IP key, so the check always failed (USER IP NOT2). |
src\ls_mainsvr\MainProcess.cpp |
Log “Local IP Error.” instead of a MessageBox |
A server running without a window must not wait on a dialog. |
Client launch line
Section titled “Client launch line”lostsaga.exe EDEW3940FVDP4950,10,20,30,1,autoupgrade_info.ini,300,0,1,938400398,?<ID>?00100000000000?0?<IP and port>- Do not put quotes around the argument. The client compares the raw command line with its check value and stops with App Cmd Error!.
- The release build is compiled with NEXON_IP, so there are five ? fields; the 4th (IP key) is unused here.
- The 10th comma field (
938400398) is the locale, the 3rd options digit (1) makes the build readrs.iopandmap.iop. - The last field packs the game server’s address:
port × 4294967296 + a + b×256 + c×65536 + d×16777216fora.b.c.d. Example:192.168.0.10:19009gives19009 × 4294967296 + 192 + 168×256 + 0 + 10×16777216.
Not working yet
Section titled “Not working yet”- Practice mode and excavation are off: the server expects other versions of
LSC_Practice.datandLSC_Excavation_*.datthan the clients have. game_spirit_get_datareturns a different number of fields than the 2019 code reads.
Good first tasks
Section titled “Good first tasks”- Translate the Korean rows added to
text_id.txtfor this client. - Find or rebuild
LSC_SnakeLadders_Reward.dat,LSC_Practice.datandLSC_Excavation_*.datin the versions this server expects. - Turn the four source fixes into a
LOSADEV_LOCALbuild option instead of plain edits.
