[Dev Rev II - BETA] download / install / build / log / debug

Welcome in the osRose emulator Project.

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

[Dev Rev II - BETA] download / install / build / log / debug

Postby lmame on Sun Jan 04, 2009 11:25 pm

***** Disclaimer *****
This is for the dev rev II, NOT for rev 80.
***** Disclaimer *****

***** Additional Notes ~ Sethanye *****
Due to the temporary absence of lmame which halted the updates of the server files, the server files will NOT work correctly with the most latest narose clients. If you want to avoid unnecessary crashes and other errors please use v306 or older client and dont patch to the latest version till lmame comes back and can bring this all up to date.

Manual Patches can be found here
http://patch.roseonlinegame.com/roseonline/evopatch/
***** Additional Notes*****


I suggest you read this thread for more details on what client is needed and on the GameGuard server.


Note:
This is a BETA coming AFTER the "dev rev 360" which is the more stable for now.




I°) Download Tortoise SVN:
To get the source code from SVN, you can use Tortoise SVN, go get it and install it:
http://tortoisesvn.tigris.org/


II°) Download source code:
The source code is available through SVN.
Create a folder somewhere, right click on it and choose "SVN checkout".
Image

Enter the URL address of the SVN (see this thread):

dev-rev2.png


If asked, enter next the login / password (beta81/beta81) and wait for the source code to be downloaded.
dev-rev2_1.png



III°) Download CodeBlocks and its plugins:
1°) Codeblocks:
To build the server, you need a "compiler", we'll use Codeblocks.
You can get it from here:
http://www.codeblocks.org/downloads/26


Take the "codeblocks-10.05mingw-setup.exe", always with the "mingw".

You can use Codeblocks 10.5 or the nightly builds which are more recent but harder to install.

Anyway, install Codeblocks, for example to c:\codeblocks.

Notes:
-> If you got some problems when you build the projects (invalid compiler...) it means quite often the path to MingW is wrong in Codeblocks, so change it:
viewtopic.php?f=27&t=33&p=35543&hilit=mingw#p35543
-> CodeBlocks 10.x wasn't compatible with dev rev, it's ok now with dev rev II ;)
-> you still can use codeblocks 8.2,


2°) the plugins:
In order to build the server, you need plugins, here they are, in this thread or here:
libmysql_pthread2.zip
(700.96 KiB) Downloaded 5601 times


Unrar them into the "plugins" folder of codeblocks, for example "c:\codeblocks\plugins". If the folder doesn't exist, create it.
Image

Once it's done, open Codeblocks, then go to menu:
Settings->Compiler and debugger
Image

Then goto tab "Search directories" and:
For tab "Compiler", add:
c:\codeblocks\plugins\include
For tab "Linker", add:
c:\codeblocks\plugins\lib
Image
Image

In my captures I installed codeblocks in d:\CBN so use your imagination and choose your "good" installation folder of course...


IV°) build the source code:
1°) open:
There are three servers as source code, login server, char server and world server. Each one has its own "project file" which are in "binary" folder:
loginserver.cbp, charserver.cbp, worldserver.cbp.
Image

To open one of those servers in Codeblocks, just double click on those files or open them in Codeblocks (File->Open).


2°) build:
It's simple, once a server is loaded into codeblocks, go in menu "build" and choose "rebuild".
Image

The exe are into the "binary" folder.

Note:
Don't build a server if the exe is already launched. Stop the server first.

Note 2:
Every time you change a single line of code, rebuild the server to update the executable.
It's not because you changed the source code that the .exe is automatically updated! You NEED to recreate it!


V°) Install the database and setup your server .conf files and IPs:
1°) Install Mysql:
Install Mysql server, the recommanded version is 5.0.x but use 5.1 or 6 if you want...
http://dev.mysql.com/downloads/mysql/5.0.html#downloads
Installation is pretty easy and straightforward usually...


Note:
You can download the tools as well:
http://dev.mysql.com/downloads/workbench/


2°) Navicat:
Navicat is a software to easily manage your databases. You're free to use another software, I'll use it for demonstration purposes.
A lite and free version exists.
Or use PhpMyAdmin (needs a webserver).

3°) create the database:
You must create a database in order to use the server.
For that, you can use navicat.

a°) create a connexion to your mysql server:
Click on "connection" the enter the informations that are needed and save.
Image

The root password is the one you chose when installing Mysql server.

b°) create a database:
Launch the connection (simply double click on it), then right click on it and choose "new database". Enter a new name (like "roseon") and it's ok.
Image

c°) create an user to access it:
It's better to create an user (mysql user) to access this database. Click on "user" and then on "add user".
Image

Enter its name and password (here "test").
Image

Then select him on the list, and the database you want to give access rights "roseon".
Image

Click on "select all" to give all rights and save.
Image


4°) Install the database:
Open the file "Database/database_installer.bat" which is your server.
Inside, you have to change some of the data according to YOUR specifications:

  1. REM MYSQL BIN PATH
  2. set mysqlBinPath=C:\Program Files\MySQL\MySQL Server 5.0\bin
  3.  
  4. set user=root
  5. set pass=
  6. set db=roseon
  7. set host=localhost


Look where your mysql server is installed for:
  1. set mysqlBinPath=C:\Program Files\MySQL\MySQL Server 5.0\bin

and change if necessary.

The other data is the informations to access your database we created. We need to give the database name (roseon) and the login / password of the user we created as well (test / your_password).
So update the data accordingly and save the file.

Then just double click on "database_installer.bat" and wait until it's done.

Note:
If you want to run the installer again, delete first the tables in your database... Use Navicat for that (launch navicat, open the database, right click on a table and hit delete).

5°) Update the .conf files:
Each server (loginserver, charserver, worldserver) has his own config file, loginserver.conf, charserver.conf, worldserver.conf.

In all the three .conf files, a block is the same it's the one used for the MySQL database access, you need to put in there your own values:
[DATABASE]
mysql_host=localhost
mysql_user=root
mysql_pass=password
mysql_database=database
mysql_port=3306
AutoQueryTime=600


So in my example it would do:
[DATABASE]
mysql_host=localhost
mysql_user=test
mysql_pass=password
mysql_database=roseon
mysql_port=3306
AutoQueryTime=600


Then each .conf file has his own details:

a°) loginserver.conf:
You need to set the IP's values for your servers, please check this guide for more details:
[SERVERDATA]
serverid=0
servertype=0
serverip=IP
serverport=29000
servername=LoginServer
connection=2
lanip=IP
lansubmask=IP



Other interesting stuff:
[LOGINSERVER]
accesslevel=100
CreateLoginAccount=0
checkGameGuard=0
usethreads=0

acceslevel means the minimum rights people must have to access your server. Players have level 100.
CreateLoginAccount means that, the first time an unknown player will try to login on your server, he will be rejected BUT an account will be created server side in your MySQL database. So if he tries to login again, it will work. It is NOT recommended, use rather a CMS to create account than this way. 0 means disable, 1 means enable.
checkGameGuard means that server should check if the player has GameGuard or not. It should be let to 0 (disabled). 0 is highly RECOMMENDED.


b°) charserver.conf:
You need to set the IP's values for your servers, please check this guide for more details:

[SERVERDATA]
serverid=1
servertype=1
serverip=IP
serverport=29100
servername=Server1
parentid=0
accesslevel=100
connection=2
lanip=IP
lansubmask=IP

acceslevel means the minimum rights people must have to access your server. Players have level 100.
servername is the server name that will be displayed after the player logs in.


c°) worldserver.conf:
You need to set the IP's values for your servers, please check this guide for more details:

[SERVERDATA]
serverid=1
servertype=2
serverip=IP
serverport=29200
servername=Channel1
maxconnections=500
parentid=1
connection=2
lanip=IP
lansubmask=IP

servername is the channel name that will be displayed after the player logs in and when he selects a world.


Other interesting stuff:
[WORLDSERVER]
accesslevel=100
welcome_msg=Welcome to Open Source Rose Online EVO

acceslevel means the minimum rights people must have to access your server. Players have level 100.
welcome_msg is the message the player will have when he joins the game (after beeing logged and choosing his avatar).


6°) configure your server's IPs:
See 5°) above and check this guide for more details.


VI°) Update your data files to match your client:
1°) extract data from the client:
You need several files taken from the client so the server has the exact same informations. This way the server will know what items are in your client, what skills can be learned and so on.
So the client and server informations MUST match.

To do this, use a vfs extract tool, for example this one.
Unzip it where you installed Rose Online, next to the .vfs files.
Image

Launch the software and choose "File->extract all" and choose a folder where all the data will go.
Image

Now wait.


2°) what is needed?:
Your server needs that you copy ALL the content of the folders from your client (the one you just extracted):
3DDATA/QUESTDATA
3DDATA/AI
3DDATA/STB

To your server. Copy those three folders into:
Image
Image
Image
Image
Image
Binary/3DData/

That's all, it's good now.


3°) .csv and .sql files:
Sometimes STB, AIP and QSD aren't enough. Especially when something changes on a NPC or spawns or telegates...
You'll have to update those .sql files using the tools that are in this thread: [rev80 / dev rev] extracters and converters (.sql, .csv).
Once you got the necessary files (see the thread for the few ones you need), IMPORT them into your database using Navicat or whatever.
If there is a mysql error, perhaps you'll have to DELETE the according table before importing the new data.
See the thread [rev80 / dev rev] extracters and converters (.sql, .csv) for an "how to".


VII°) tips/tricks:
Most of the informations are on the other "rev 80" tutorial, I'll tell here only other stuff...

1°) client version:
You MUST use the "Trose.exe" from the game, no need anymore for "gameguard patch". DON'T USE THE GAMEGUARD PATCH.


2°) GameGuard server:
You'll need to setup one, check this thread for files and instructions.
Or you can use a Trose.Exe without Gameguard:
viewtopic.php?f=18&t=2106

Note:
Since their client 212, naRose REMOVED Gameguard so if you're using naRose client 212 and above, you DON'T need to setup a Gameguard server anymore.
So you can use the naRose client, with naRose's Trose.exe, without Gameguard server.



2°) launching servers:
You have to launch in order: loginserver.exe, then charserver.exe, then worldserver.exe.

3°) config tricks:
a°)In loginserver.conf:
set this to 1 if you want to create automatically an account. First time it'll fail, next time the guy will be able to login.
it's supposed to check if Gameguard is installed or not. 0 is RECOMMENDED.

b°) where are the other config?:
Most of them have been moved to the mysql table "list_config", go see there:
viewtopic.php?f=18&t=4261


4°) how to have log files?:
You simply have to create a folder "log" into your "binary" folder to get your servers logs.
Image
Image
Image
To get packets as well, create a folder "plog" into your "binary" folder.


5°) Running a server in debug mode:
It's very useful if you got a crash and want to report something.

Open the server you want to run in debug mode, let's say "loginserver.cbp".
Then hit "Debug"->"Start" and the server should launch itself.
Image
Image

Note:
In some rare occasions you'll have messages like that:
Image
Hit "Control+F7" to pass that until the server is launched.


When a crash occurs, Codeblocks will trap it and will tell you where it happened:
SNAG-dev_rev_0005.png


Be sure to have the "call stack" window opened:
Image
Image

To have all the interesting informations like line numbers and so on, make a screenshot of it.
Image

See this thread to know what watches are (seeing variables values while debugging).

Press the stop to stop debug mode:
Image


6°) Update the server (SVN):
It's easy. First stop all the servers, else you would have troubles.
Then right click on the folder where is your source code, then select "SVN Update":
SNAG-dev_rev_0000.png
SNAG-dev_rev_0000.png (9.64 KiB) Viewed 101448 times


And wait...
SNAG-dev_rev_0001.png


Now, of course if some code changed in the server, REBUILD them before launching them again.



7°) See the SVN Logs:
For each rev, the devs tell what changed. It's QUITE important you READ them!
To do this, simply right click on the folder where you source code is, then "properties":
SNAG-dev_rev_0002.png


Then tab "subversion" and "show log".
SNAG-dev_rev_0003.png


Wait a bit and you'll have the history.
SNAG-dev_rev_0004.png



8°) Dev rev updates:
Sometimes from one rev to another some files are updated, like STB, AIP and QSD files. Those files don't need special handling.
Though sometimes some databases files (.sql) are changed, you NEED to import back those files into your mysql database, with Navicat for example.
The best way is FIRST to delete the according database table BEFORE importing the new one.
For example if you "list_npcs.sql" changed, delete the table "list_npcs" and import after the file "list_npcs.sql".

9°) How to post a bug, how to export data from an avatar:
See this thread in bug forum:
viewtopic.php?f=30&t=2173

10°) how to launch the game?:
Make a batch file (like "rose.bat") near Trose.Exe with this command line:
  1. TRose.exe @TRIGGER_SOFT@ _server your_server_ip

so for example:
  1. TRose.exe @TRIGGER_SOFT@ _server 127.0.0.1



11°) GM commands:
Most of the time GM Commands needs at least a 300 level AND the "isgm" flag set to 1 for a player.
You can set the player's "level" into the "account" mysql table, it will apply for ALL his avatars (characters).
You can set the "isgm" to 1 into the "characters" mysql table, for each of his avatar (one can have this, one don't...).

If you want to give your players access to some GM commands, you must set the access level for this command so they can use them. It's in file "commands.ini". By default it's GM (level 300) only, for example /go:
[/quote]Go=299[/quote]

If you want players (who are only level 100) to access it you need to change the value by:
[/quote]Go=99[/quote]


Notes:
-> For your GMs it's better than you give them 300 level AND the isGM set to 1,
-> Some GM commands check that the "isgm" flag is set to 1 for example:
  1. if(Config.Command_Ban > thisclient->Session->accesslevel || thisclient->CharInfo->isGM == false)

So this command wouldn't be accessible to players, even if you lower its access to "99" in commands.ini.


12°) Where can I find an item list, GM command lists, class list?:
You can use the amazing PurpleYouko's website and use too the amazing rl2171 admin's guide which is in the tools SVN.


13°) I'd like to install a CMS and an item mall:
Look at the guide for rev 80 for some details, but there are some new CMS available in this forum, for example this one.
An item mall done by Rifke is in this forum too.

Note:
You should check that the CMS are "hack" free. That means the MySQL queries are sanitized (using mysql_real_escape_string, stuff like that), there are some discussions on it in the forum.


14°) Can I install the Dev Rev database on top on my old rev 80 one?:
No.
Some fields and unique keys have been added (like ow_slot) so please do a NEW mysql database and install in it the dev rev database using the installer.
Then if you want to import your "old" characters, account, items and so on, export them (dump) from your rev 80 and import them back in the new database.
BUT don't use "drop" and "create". Only "insert" mysql commands.
Meaning respect the tables structure...


15°) I have a lot of warning about missing QSDs:
It's ok.
It's because from time to time naRose doesn't clean the QSD list and removes "old" QSD files (from event for example) and doesn't update the QSD list (.stb file).


16°) I want to add a map / I have a warning about "NB_GRIDS"?:
NB_GRIDS tells the server how many active maps are expected. It's very important you solve this warning!

See this thread:
viewtopic.php?f=18&t=3901


17°) I want to add a skill to each player when they create an avatar (like drving cart or CG)?:
You need to change the "default" value of the field "basic_skills" in "characters" mysql table to add (or delete) it.
Open Navicat Lite (or PhpMyAdmin), right click on "characters" and "Design Table":
skill_01.png


there in "basic_skills" you see in "default" all the skills a player will have when he'll create a new avatar.
If you want to add one, just add a ",xxxx" at the end of the line, for example: ",5002" (without the " of course).
If you want to delete one, just delete the ",yyyy" (yyy beeing the skill ID), for example ",5001".
skill_02.png


Btw., 5001 is driving cart skill, 5002 for CG.


18°) I have some errors when I try to buy an item from a NPC?:
If you have those errors:
npc_01.jpg
npc_01.jpg (9.78 KiB) Viewed 88896 times

npc_02.jpg

That means your server and data files (list_sell.stb) aren't the same. So it's very possible other files aren't the same as well.
So extract the files from your client and copy them to your server (see VI°)).
See this thread too for more explanations:
viewtopic.php?f=18&t=4250&start=0


19°) what are the differences between "dev rev 360" and "dev rev II":
Mostly a lot of fixes, hack fixes and a loooot of other stuff :)
You can see the list here, wit the list of the bugs to be adressed:
viewtopic.php?f=18&t=4482


20°) can I update from "dev rev 360" to "dev rev II"?:
Well... The answer is yes. The database has seen some changes but it's possible.
I haven't had the time to finish to test the "upgrade" mysql script ("/database/devrev360_to_devrevII.sql").
Anyway I would recommend, for now, to install dev rev II in a separate folder and in a separate database for now, for tests.


21°) Can I use the other tutorials for "dev rev 360" for "dev rev II"?:
Yes.
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: [Dev Rev II] download / install / build / log / debug

Postby lmame on Sun Oct 24, 2010 7:42 pm

Please look at the latest "FAQ" questions before asking questions ;)

And PLEASE, post and report bugs in the "BUGS" forum!
If you don't report bugs, they will NOT fix themselves :lol:.

You really should read the svn logs here:
viewtopic.php?f=18&t=4129

There are a LOT of informations in it with details of features as well as new / updated gm commands.
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: [Dev Rev II] download / install / build / log / debug

Postby lmame on Sun Oct 24, 2010 9:35 pm

New drop system:
In dev rev II we are using now the "AND" drop system.


0°) What is the "AND" drop system?:
Basically it's a better and faster drop system than the old one.
And it gives you also much more options.
The table used for the and drop system is "item_drops_and".
The structure is pretty much the same as the "old" drop table ("item_drops"):
  1. `ref`: mysql id of the drop
  2. `id`: Item num of the drop (like 456 for item 12::456),
  3. `type`: Item type of the drop (like 12 for item 12::456),
  4. `min_level`: minimum level the player must be so this line can drop,
  5. `max_level`: maximum level the player must be so this line can drop,
  6. `prob`: probability this line can drop, (10000 = 100%)
  7. `map`: map ID it will drop (0=all maps),
  8. `mob`: monster type who will drop (0=all monsters),
  9. `a_x`: X coordinate in the map (map MUST be defined) where it will drop,
  10. `a_y`: Y coordinate in the map (map MUST be defined) where it will drop,
  11. `a_range`: goes with a_x and a_y, the drop will come around the point (a_x;a_y) in map "map" in a range of "a_range".
  12. `alt`: alternative drops (most of the time, blues),
  13. `description`: drop description,


So what does that mean?
Now you can say:
this drop will only come if a monster "mob" is killed in map "map" and only if the player is from level "min_level" to "max_level".
That's the "AND" system.
You'll be able to do precise drops who will be active only on some maps, and on some monsters, and so on.


1°) activate it / deactivate it:
You can still use your "old" drops if you set "drop_rev" to 0 in the "list_config" mysql table.
If you set it to 1 you activate the "AND" system.
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: [Dev Rev II - BETA] download / install / build / log / d

Postby observe on Mon Oct 25, 2010 2:36 am

fkn awsome =]

DLing right now, than test =]
observe
osRose dev
osRose dev
 
Posts: 194
Joined: Thu Sep 17, 2009 10:28 am
Location: The Netherlands

Re: [Dev Rev II - BETA] download / install / build / log / d

Postby Terr0risT on Mon Oct 25, 2010 3:49 am

Very nice.. awesome work lmame!
User avatar
Terr0risT
Rackie
Rackie
 
Posts: 162
Joined: Sat Aug 11, 2007 10:22 am

Re: [Dev Rev II - BETA] download / install / build / log / d

Postby fransh on Sat Nov 13, 2010 4:32 pm

Yeah GJ, cant wait to use it.

One thing,

List_mobgroup_special.sql is missing so i cant run my worldserver.exe right now.

Could you upload yource please?
fransh
Smoulie
Smoulie
 
Posts: 34
Joined: Fri Jul 09, 2010 10:38 am

Re: [Dev Rev II - BETA] download / install / build / log / d

Postby lmame on Sat Nov 13, 2010 4:39 pm

You don't need it, it's not in dev rev II and it's not used in it.
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: [Dev Rev II - BETA] download / install / build / log / d

Postby 5oregon5 on Mon Dec 06, 2010 10:25 pm

I placed the username and password in SVN keeps saying its wrong...and I did it like 50 times lol
5oregon5
Pomic
Pomic
 
Posts: 74
Joined: Fri Jun 18, 2010 7:35 pm

Re: [Dev Rev II - BETA] download / install / build / log / d

Postby nostra on Tue Dec 07, 2010 12:39 am

SVN is dead :( :?
nostra
Jelly Bean
Jelly Bean
 
Posts: 11
Joined: Tue Dec 07, 2010 12:28 am

Re: [Dev Rev II - BETA] download / install / build / log / d

Postby luciofabio on Wed Dec 08, 2010 4:04 am

New User/Pass?

Can we get it? Or now are locked?
luciofabio
Smoulie
Smoulie
 
Posts: 49
Joined: Tue Jul 14, 2009 1:18 am

Next

Return to Support - OsRose Emulator

Who is online

Users browsing this forum: No registered users and 8 guests

cron